<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:with="title='十里湘商城登录',active='home'">
<head>
    <meta charset="utf-8" />
    <title>十里湘商城-注册</title>
    <link rel="stylesheet" type="text/css" href="/css/public.css" />
    <link rel="stylesheet" type="text/css" href="/css/register.css"/>
    <script type="text/javascript">
        function checkinput()
        {
            if(myform.username.value=="")
            {
                alert("请输入用户名");
                myform.username.focus();
                return false;
            }
            if (myform.pass_word.value=="")
            {
                alert("请输入密码");
                myform.pass_word.focus();
                return false;
            }

            if(myform.pass_word.value != myform.pwdconfirm.value){
                alert("你输入的两次密码不一致，请重新输入！");
                myform.pass_word.focus();
                return false;
            }
            if (myform.userSex.value=="")
            {
                alert("请输入性别");
                myform.userSex.focus();
                return false;
            }
        }
       /* function ck() {
            alert("aa");
            if ($('#cc').checked == true) {
                alert("选中");
            } else {
                alert('未选中');
            }
        }*/
        function check(){
            var checkbox = document.getElementById("ch");//选中checkbox的id；
            if(checkbox.checked==true){//按钮已选中
                document.getElementById("but").style.backgroundColor="whitesmoke";
                document.getElementById("but").style.color="#000";
                document.getElementById("but").removeAttribute("disabled");//移除disabled
            }else{
                document.getElementById("but").disadled="disabled";
            }
        }
    </script>
    <style type="text/css">

        body{
            background-color: rgba(0, 0, 0, 0.06);
        }
        .container{
            /*border-radius: 25px;*/
            margin:0 auto;
            margin-top: 50px;
            width:1067px;
            height:533px;
            display: flex;
            flex-direction: row;
            position:relative;
            border-radius: 25px;
        }
        .right {
            width:534px;
            height:533px;
            background: #FFF9E7;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .left {
            width:533px;
            height:533px;
            background: url(/img/13.png) no-repeat;
            background-size:533px 533px;
        }
        button{
            background-color: white;
            border: none;
            color: rgba(16, 17, 17, 0.34);
            padding: 10px 70px;
            text-align: center;
            display: inline-block;
            font-size: 16px;
            cursor: pointer;
            margin-top: 30px;
            margin-left: 50px;
        }
        .res_input{
            width: 200px;
            color: #858480;
            padding: 7px 5px;
            font-size:16px;
            border-radius: 3px;
            border-bottom: 1px solid #e9e9e9;
            border-left: 0px;
            border-top: 0px;
            border-right: 0px;
            background-color: #FFF9E7;
        }
        /*body {*/
            /*background: url(http://localhost:8894/user-consumer/templates/img/2.jpg) no-repeat center center fixed;*/
            /*-webkit-background-size: cover;*/
            /*-moz-background-size: cover;*/
            /*-o-background-size: cover;*/
            /*background-size: cover;*/
        /*}*/
    </style>
</head>
<body >
<form action="/admin/register" method="get" name="myform" onsubmit=" return checkinput();" >
    <div class="container" >
        <div class="left"></div>
        <div class="right">
            <p align="center" style="padding: 50px 0px;font-size:24px;">用户注册</p>
            <p style="padding-bottom: 20px;color: #858480;font-size:16px;">用　　户 <input type="text" class="res_input" name="uname" id="username" ></p>
            <p style="padding-bottom: 20px;color: #858480;font-size:16px;">密　　码 <input type="password" class="res_input" name="upassword" id="pass_word" ></p>
            <p style="padding-bottom: 20px;color: #858480;font-size:16px;">确认密码 <input type="password" class="res_input" name="pwdconfirm" id="pwdconfirm"  ></p>
            <p style="padding-bottom: 20px;color: #858480;font-size:16px;">性　　别 <input type="text" class="res_input" name="usex" id="userSex" ></p>
            <br/>
            <p><input type="checkbox" name="agree"  id="ch" onclick="check()"  style="margin-left:5px;display:inline-block;border: 1px solid white;padding: 7px 0px;border-radius: 3px;" value="0"/>
            <span style="font-size:14px;text-align: center;color: #858480">我已阅读并同意《用户注册协议》</span></p>
            <button type="submit" value="注册" disabled="disabled" id="but">立即注册</button>
        </div>
    </div>
</form>
</body>
</html>